Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for the web-fonts to be load before calling checkLayout script. #22332

Merged

Conversation

javifernandez
Copy link
Contributor

We should ensure that the Ahem font is loaded before executing the test asserts.

Additionally, this PR uses the cehckLayout api to avoid calliing done() in the intermediate steps.

Copy link
Member

@mrego mrego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing it.


grid.style.height = "300px";

item1.setAttribute("data-offset-y", "35");
item2.setAttribute("data-offset-y", "160");
checkLayout('#grid');

checkLayout('#grid', true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: You don't need to pass "true" on the last call, but it's fine if you want to be explicit here. Feel free to keep it or remove it as you wish.

@javifernandez javifernandez merged commit 02b166f into web-platform-tests:master Mar 20, 2020
@javifernandez javifernandez deleted the wait-for-webfonts branch March 20, 2020 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants